home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 May / PC för Alla 0505.iso / fullversioner / realsoft3d / data1.cab / Scripting / scripts / js / real / objects / r3level.js < prev    next >
Encoding:
JavaScript  |  2005-04-04  |  5.9 KB  |  205 lines

  1.  
  2. // JavaScript wrapper for r3level.h
  3. // Auto generated file, do not modify by hand
  4. // Copyright ⌐ 2004, Realsoft Graphics Oy
  5.  
  6. var R3_LEVEL_H = 1;
  7. include("real/objects/r3prim.js")
  8.  
  9.  
  10. var R3CLID_LEVEL = 143;
  11.  
  12.  
  13.  
  14.  
  15. // Description: Inserts new sub object at the head of the children list
  16. // p1: Boolean, don't send childchanged method
  17. // p3: Object, address of the object to be inserted
  18.  
  19. R3LEVM_ADDTAIL = 143000;
  20.  
  21. function mR3LEVM_ADDTAIL(p1, p3) {
  22.   DoA2(this.r3obj, 143000, p1, R3TID_BOOLEAN, 0, p3, R3TID_OBJECT, 0);
  23. }
  24.  
  25. // Description: Insert given object to the head of the children list
  26. // p1: Boolean, don't send childchanged method
  27. // p3: Object, object to be inserted
  28.  
  29. R3LEVM_ADDHEAD = 143001;
  30.  
  31. function mR3LEVM_ADDHEAD(p1, p3) {
  32.   DoA2(this.r3obj, 143001, p1, R3TID_BOOLEAN, 0, p3, R3TID_OBJECT, 0);
  33. }
  34.  
  35. // Description: Remove the given children from the children list
  36. // p3: Object, sub object to be removed
  37.  
  38. R3LEVM_REMOVE = 143002;
  39.  
  40. function mR3LEVM_REMOVE(p3) {
  41.   DoA(this.r3obj, 143002, p3, R3TID_OBJECT, 0);
  42. }
  43.  
  44. // Description: Enumerates sub objects (not recursive). If the callback returns a positive value, enumeration continues
  45. //      to the next sub object. If 0 or negative value is returned, enumeration is cancelled
  46. //      and the return value from the callback is returned to the caller.
  47. // p3: Tag[], reserved for future use
  48.  
  49. R3LEVM_ENUMCHILDREN = 143003;
  50.  
  51. function mR3LEVM_ENUMCHILDREN(p3) {
  52.   Do(this.r3obj, 143003, p3, R3TID_TAG, R3TNF_ARRAY);
  53. }
  54.  
  55. // Description: Fetch sub object by its ordnum. The first sub object corresponds to the ordnum
  56. //      0.
  57. // Returns: Object, address of the object or NULL if ordnum is higher than the number of
  58. //      sub objects
  59. // p3: Integer, ordnum of the sub object to be returned
  60.  
  61. R3LEVM_GETSUBBYORDNUM = 143004;
  62.  
  63. function mR3LEVM_GETSUBBYORDNUM(p3) {
  64.   return R3ToJS(  DoA(this.r3obj, 143004, p3, R3TID_INTEGER, 0));
  65. }
  66.  
  67. // Description: Add new simulation function for the level class.
  68. // Returns: Boolean, TRUE if succeeded, FALSE otherwise
  69. // p1: Integer, NULL if OBJECTWISE effect, otherwise tag id for the attribute to be hold the
  70. //      cause/affect information.
  71. // p2: Integer, Type of the simulation to be plugged in, see R3SIMTYPE_ codes below
  72.  
  73. R3LEVCM_REGISTERSIMULATIONFU = 143005;
  74.  
  75. function mR3LEVCM_REGISTERSIMULATIONFU(p1, p2) {
  76.   return   DoA3(this.r3obj, 143005, p1, R3TID_INTEGER, 0, p2, R3TID_INTEGER, 0, 0, R3TID_INTEGER, 0);
  77. }
  78.  
  79. // Description: Insert new object after the given node
  80. // Returns: Boolean, true of node was found
  81. // p1: Boolean, don't send childchanged method
  82. // p2: Object, previous object
  83. // p3: Object, object to be inserted    
  84.  
  85. R3LEVM_INSERT = 143006;
  86.  
  87. function mR3LEVM_INSERT(p1, p2, p3) {
  88.   return   DoA3(this.r3obj, 143006, p1, R3TID_BOOLEAN, 0, p2, R3TID_OBJECT, 0, p3, R3TID_OBJECT, 0);
  89. }
  90.  
  91. // Description: callback method for R3PRIMCA_SetParentXxx.
  92. // p1: Object, old parent
  93. // p2: Object, new parent
  94. // p3: Object, child whose parent is to be changed.    
  95.  
  96. R3LEVCM_SETPARENT = 143007;
  97.  
  98. function mR3LEVCM_SETPARENT(p1, p2, p3) {
  99.   DoA3(this.r3obj, 143007, p1, R3TID_OBJECT, 0, p2, R3TID_OBJECT, 0, p3, R3TID_OBJECT, 0);
  100. }
  101.  
  102. // Description: Enumerate target objects for the given constructor.
  103. // p1: Object, constructor object
  104. // p2: Integer, constructor method
  105. // p3: Integer, callback data
  106.  
  107. R3LEVM_ENUMTARGETS = 143008;
  108.  
  109. function mR3LEVM_ENUMTARGETS(p1, p2, p3) {
  110.   DoA3(this.r3obj, 143008, p1, R3TID_OBJECT, 0, p2, R3TID_INTEGER, 0, p3, R3TID_INTEGER, 0);
  111. }
  112.  
  113. // Description: Internal methods for average map related use
  114.  
  115. R3LEVM_SIBLINGCHANGED = 143010;
  116.  
  117. function mR3LEVM_SIBLINGCHANGED() {
  118.   DoA(this.r3obj, 143010, 0, R3TID_INTEGER, 0);
  119. }
  120.  
  121.  
  122.  
  123.  
  124. R3LEVA_Sub = 143500;
  125. function GetR3LEVA_Sub() {
  126.   return R3Get(this.r3obj, R3LEVA_Sub, R3TID_LIST, R3TNF_ARRAY); 
  127. }
  128.  
  129. R3LEVA_Boolean = 143501;
  130. function SetR3LEVA_Boolean(value) {
  131.   R3Set(this.r3obj, R3LEVA_Boolean, value, R3TID_INTEGER, 0); 
  132. }
  133.  
  134. function GetR3LEVA_Boolean() {
  135.   return R3Get(this.r3obj, R3LEVA_Boolean, R3TID_INTEGER, 0); 
  136. }
  137.  
  138. var R3LEVA_OrdNum = 143502; // Integer
  139. R3LEVA_HasRenderGeometry = 143503;
  140. function GetR3LEVA_HasRenderGeometry() {
  141.   return R3Get(this.r3obj, R3LEVA_HasRenderGeometry, R3TID_INTEGER, 0); 
  142. }
  143.  
  144. R3LEVA_Simulation = 143504;
  145. function SetR3LEVA_Simulation(value) {
  146.   R3Set(this.r3obj, R3LEVA_Simulation, value, R3TID_INTEGER, 0); 
  147. }
  148.  
  149. function GetR3LEVA_Simulation() {
  150.   return R3Get(this.r3obj, R3LEVA_Simulation, R3TID_INTEGER, 0); 
  151. }
  152.  
  153. R3LEVA_SubCount = 143508;
  154. function GetR3LEVA_SubCount() {
  155.   return R3Get(this.r3obj, R3LEVA_SubCount, R3TID_INTEGER, 0); 
  156. }
  157.  
  158. R3LEVA_Children = 143509;
  159. function GetR3LEVA_Children(index) {
  160.   return R3GetIndexed(this.r3obj, R3LEVA_Children, index, R3TID_OBJECT, 0); 
  161. }
  162.  
  163. var R3SIT_INACTIVE = 0;
  164. var R3SIT_BOTH = 1;
  165. var R3SIT_SUBJECT = 2;
  166. var R3SIT_OBJECT = 3;
  167. var R3SIMTYPE_OBJECTWISE = 0;
  168. var R3SIMTYPE_PAIRWISE = 1;
  169. var R3SIMTYPE_PAIRWISEASYMM = 2;
  170. var R3BOOL_OR = 0;
  171. var R3BOOL_AND = 1;
  172. var R3BOOL_BRT = 2;
  173. var R3BOOL_MAP = 3;
  174.  
  175.  
  176. function r3Level () { 
  177.    this.base = r3God;
  178.    if(arguments.length) {
  179.       this.base(R3CLID_LEVEL, arguments);
  180.    }
  181.    // Methods
  182.    this.ADDTAIL=mR3LEVM_ADDTAIL;
  183.    this.ADDHEAD=mR3LEVM_ADDHEAD;
  184.    this.REMOVE=mR3LEVM_REMOVE;
  185.    this.ENUMCHILDREN=mR3LEVM_ENUMCHILDREN;
  186.    this.GETSUBBYORDNUM=mR3LEVM_GETSUBBYORDNUM;
  187.    this.REGISTERSIMULATIONFU=mR3LEVCM_REGISTERSIMULATIONFU;
  188.    this.INSERT=mR3LEVM_INSERT;
  189.    this.SETPARENT=mR3LEVCM_SETPARENT;
  190.    this.ENUMTARGETS=mR3LEVM_ENUMTARGETS;
  191.    this.SIBLINGCHANGED=mR3LEVM_SIBLINGCHANGED;
  192.  
  193.    // Attributes
  194.    this.GetSub=GetR3LEVA_Sub;
  195.    this.GetBoolean=GetR3LEVA_Boolean;
  196.    this.SetBoolean=SetR3LEVA_Boolean;
  197.    this.GetHasRenderGeometry=GetR3LEVA_HasRenderGeometry;
  198.    this.GetSimulation=GetR3LEVA_Simulation;
  199.    this.SetSimulation=SetR3LEVA_Simulation;
  200.    this.GetSubCount=GetR3LEVA_SubCount;
  201.    this.GetChildren=GetR3LEVA_Children;
  202. }
  203.  
  204. r3Level.prototype=new r3Primitive;
  205. // r3level.h_H